package com.yang.tools.util;

public class PathUtil
{
	public static String getLastFolderName(String str)
	{
		if (str != null)
		{
			str = str.substring(0, str.lastIndexOf("/"));
			str = str.substring(str.lastIndexOf("/") + "/".length());
		}
		return str;
	}

	public static String completeTheTailSlash(String str)
	{
		if (str == null)
		{
			return null;
		}
		if (!str.trim().endsWith("/"))
		{
			str = str + "/";
		}
		return str;
	}
}
